<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
<!--自动检测屏幕大小-->		
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">		
		
		<title></title>
		<link rel="stylesheet" type="text/css" href="js/bootstrap.css"/>
		<script src="js/jquery-3.2.0.min.js"></script>
		<script src="js/bootstrap.js"></script>
		
		
	</head>
	<body class="container">
		<h3 class="page-header text-center">进度条</h3>
		
		<p>..progress 默认颜色为蓝色<br /></p>
<!--******************************************************************-->		
		<div class="progress">
			<div class="progress-bar" style="width: 60%;">60%</div>
		</div>
		
		<div class="progress">
			<div class="progress-bar progress-bar-success" style="width: 60%;">..progress-bar-success</div>
		</div>
		<div class="progress">
			<div class="progress-bar progress-bar-info" style="width: 60%;">..progress-bar-info</div>
		</div>
		<div class="progress">
			<div class="progress-bar progress-bar-warning" style="width: 60%;">..progress-bar-warning</div>
		</div>
		<div class="progress">
			<div class="progress-bar progress-bar-danger" style="width: 60%;">..progress-bar-danger</div>
		</div>
		
		
		
		<p>
			..progress-bar-striped 条纹<br />
			..active 条纹动画
		</p>
<!--*******************************************************************-->		
		<div class="progress">
			<div class="progress-bar progress-bar-striped" style="width: 60%;">60%</div>
		</div>
		
		<div class="progress">
			<div class="progress-bar progress-bar-striped active" style="width: 60%;">60%</div>
		</div>
		


		<p>堆叠</p>
<!--********************************************************************-->		
		<div class="progress">
			<div class="progress-bar progress-bar-success" style="width: 20%;">20%</div>
			<div class="progress-bar progress-bar-info" style="width: 30%;">30%</div>
			<div class="progress-bar progress-bar-danger" style="width: 40%;">40%</div>
			
		</div>

		
		<p>用 jq 做的进度条</p>
<!--*****************************************************************-->		
		<div class="progress progress">
			<div class="progress-bar aaa" style="width: 0%;"></div>
		</div>
		
		<script>
			$('.aaa').animate({
				'width':"100%"
			},1000);
		</script>
	
	
	
	
		<p>原生 js 做的进度条，带百分比显示</p>
<!--*****************************************************************-->		
		<div class="progress progress">
			<div class="progress-bar bbb" style="width: 0%;"></div>
		</div>
		
		<script>
			/*
				初始 s=0，速度 v=2，每 100 毫秒增加 2
				s>=100时结束程序
			 */
			s=0;
			v=2;
			
			sobj=setInterval(function(){
				s+=v;
				if(s>=100){
					clearInterval(sobj);
				}
				$('.bbb').html(s+'%').css({'width':s+'%'});
			},100);
			 
		</script>
<!--*****************************************************************-->		
	
	
	
	
	</body>
</html>
